@using Abc.Core;
@using Abc.Application;
@{
    ViewData["Title"] = "RoleInfo";
}

<section class="panel panel-padding">
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">

        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">名称</label>
                <div class="layui-input-block">
                    <input name="Name" lay-verify="Name" autocomplete="off" placeholder="请输入名称" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    @*<i class="layui-icon layui-icon-about" style="font-size: 30px; color: #dddddd;"></i>*@
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input name="Title" lay-verify="Title" autocomplete="off" placeholder="请输入标题" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    @*<i class="layui-icon layui-icon-about" style="font-size: 30px; color: #dddddd;"></i>*@
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-btn submitbtn" lay-submit lay-filter="submit">提交数据</div>
                    <div class="layui-btn layui-btn-danger closewindow">关闭窗口</div>
                    <div class="layui-btn layui-btn-danger refreshwindow">重新加载</div>
                </div>
            </div>
        </form>
    </div>
</section>

@*<script src="~/lib/ckeditor4/ckeditor.js"></script>*@
@section Scripts{
    <script>
         layui.define(['element',  'jquery', 'form'], function () {
             let $ = layui.jquery;
             let form = layui.form;
             let element = layui.element;
             let dtree = layui.dtree;

             //Info 初始化
             abc.infoInit();
             //提交
             form.on('submit(submit)', function (obj) {
                 //obj.field.IsEnable=$('#IsEnable').is(':checked');
                 //obj.field.Remark = Remark.getContent();

                 abc.post({ url: '@(Url.Action("TestValidate"))', data: obj.field});

                 //$.post("@(Url.Action("Edit"))", obj.field, function (result) {
                 //    if (result.Su) {
                 //        //var index = parent.layer.getFrameIndex(window.name);
                 //        //parent.layer.close(index);//关闭当前页
                 //    }
                 //    layer.msg(result.Msg);
                 //});

                 return false;
             });

         });
    </script>
}
